package xsdcl;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

public class VerbUtils
{
	private List<String> verbList;

	public VerbUtils()
	{
		verbList = new ArrayList<String>();
		LoadVerbs();
	}
	
	public void LoadVerbs()
	{
		verbList.clear();
		File verbs = new File("./verbs.txt");

		BufferedReader reader = null;
		try
		{
			reader = new BufferedReader(new FileReader(verbs));
		} catch (FileNotFoundException e1)
		{
			e1.printStackTrace();
		}
		
		String s;
		try
		{
			while ( (s = reader.readLine()) != null)
				verbList.add(s);
		} catch (IOException e)
		{
			e.printStackTrace();
		}
	}
	
	public boolean isVerb(String word)
	{
		return verbList.contains(word.trim());
	}
}
